% https://www.mathworks.com/help/images/ref/edge.html
% img1
img1 = imread('./img1.png');
g1 = rgb2gray(img1);
subplot(1, 4, 1), imshow(img1), title("img1", "FontWeight", "bold");
subplot(1, 4, 2), imshow(edge(g1, 'roberts')), title("roberts", "FontWeight", "bold");
subplot(1, 4, 3), imshow(edge(g1, 'sobel')), title("sobel", "FontWeight", "bold");
subplot(1, 4, 4), imshow(edge(g1, 'log')), title("laplacian of gaussian", "FontWeight", "bold");

% img2
img2 = imread('./img2.png');
g2 = rgb2gray(img2);
figure;
subplot(1, 4, 1), imshow(img2), title("img2", "FontWeight", "bold");
subplot(1, 4, 2), imshow(edge(g2, 'roberts')), title("roberts", "FontWeight", "bold");
subplot(1, 4, 3), imshow(edge(g2, 'sobel')), title("sobel", "FontWeight", "bold");
subplot(1, 4, 4), imshow(edge(g2, 'log')), title("laplacian of gaussian", "FontWeight", "bold");

% img3
img3 = imread("./img3.png");
g3 = rgb2gray(img3);
figure;
subplot(1, 4, 1), imshow(img3), title("img3", "FontWeight", "bold");
subplot(1, 4, 2), imshow(edge(g3, 'roberts')), title("roberts", "FontWeight", "bold");
subplot(1, 4, 3), imshow(edge(g3, 'sobel')), title("sobel", "FontWeight", "bold");
subplot(1, 4, 4), imshow(edge(g3, 'log')), title("laplacian of gaussian", "FontWeight", "bold");

